﻿/// <reference path="../typings/backbone/backbone.d.ts" />

import bb = Backbone;

export module CustomerModels
{
    export interface ICustomerShort
    {
        Id: number;
        FullName: string;
    }

    export class CustomerShort extends bb.Model implements ICustomerShort
    {       
        get Id(): number
        {
            return this.get( 'Id' );
        }
        set Id(value:number)
        {
            this.set( 'Id', value );
        }

        get FullName(): string
        {
            return this.get( 'FullName' );
        }
        set FullName( value: string )
        {
            this.set( 'FullName', value );
        }
    }

    export class CustomerShortList extends bb.Collection<CustomerShort>
    {
        url = 'Customer';
    }
}
